let app = getApp();
Page({
  data: {
      orderList:[
        { text: "待付款", src:"/access/imgs/mine/mine_wallet.png"},
        { text: "待发货", src: "/access/imgs/mine/mine_cat.png" },
        { text: "待收货", src: "/access/imgs/mine/mine_gift.png" },
        { text: "待评论", src: "/access/imgs/mine/mine_eval.png" },
        { text: "退款退货", src: "/access/imgs/mine/mine_return.png" },
      ],
    accountDto:null,
    user:null,
  },
  jumpMineWine(event){
    let thisId = event.currentTarget.id,url='';
    thisId == "wine" ? url = "/pages/mine/mine-main/mine-main?flag=wine" : url = "/pages/mine/mine-main/mine-main?flag=money";
    wx.navigateTo({url: url});
  },
  onLoad(){
    wx.showLoading({
      title: '请稍等...',
    })
  },
  onShow(options) {
    app.checkLogin()
    .then((data)=>{
      wx.hideLoading();
      this.setData({
        accountDto: data.accountDto,
        user:data.user
      })
    })
    .catch((e)=>{
      wx.hideLoading();
      wx.navigateTo({
        url: '/pages/accreditLogin/accreditLogin'
      })
    })
  },
})